﻿@model IEnumerable<GestionInmobiliaria.Web.UsuarioWS.Usuario>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Listado de Usuarios</h2>

<p>
    <a href="@Url.Action("Create")" class="btn btn-primary">Agregar usuario</a>
    @Html.ActionLink("Agregar usuario", "Create")
</p>
<table class="table table-hover">
    <tr>
        <th>Id</th>
        <th>Login</th>
        <th>Clave</th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr class="active">
        <td>
            @Html.DisplayFor(modelItem => item.id)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.login)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.clave)
        </td>
        <td>
            @Html.ActionLink("Editar", "Edit", new {  id=item.id}) |
            @Html.ActionLink("Ver detalle", "Details", new { id=item.id }) |
            @Html.ActionLink("Eliminar", "Delete", new {  id=item.id })
        </td>
    </tr>
}

</table>